
package com.ami.kvm.jviewer.gui;

import com.ami.kvm.jviewer.Debug;
import com.ami.kvm.jviewer.JViewer;
import com.ami.kvm.jviewer.kvmpkts.KVMClient;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.swing.AbstractButton;
import javax.swing.Box;
import javax.swing.ButtonGroup;
import javax.swing.ButtonModel;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.Timer;

public class KVMShareDialog {
	public static final boolean FIRST_USER = true;
	public static final boolean SECOND_USER = false;
	public static final byte KVM_SHARING = 0;
	public static final byte KVM_SELECT_MASTER = 1;
	public static final byte KVM_FULL_PERMISSION_REQUEST = 2;
	public static boolean isMasterSession;
	private int kvmsDecisionDuration = 30;

	private final int NORTH_PANEL_STRUT = 150;
	private JButton kvmsSubmitButton = null;
	private JLabel kvmsRequestLabel = null;
	private JDialog kvmsResponseDialog = null;
	private JDialog kvmsRequestDialog = null;
	private Timer kvmsTimer = null;
	private JLabel kvmsTimerLabel = null;
	private JLabel mediaRedirStatus = null;
	private JRadioButton fullAccessChoice = null;
	private JRadioButton partialAccessChoice = null;
	private JRadioButton denyAccessChoice = null;
	private JPanel kvmsNorthPanel = null;
	private JPanel kvmsCenterPanel = null;
	private JPanel kvmsSouthPanel = null;
	private JPanel kvmsResponsePanel = null;
	private JLabel kvmsResponseLabel = null;
	private JPanel kvmsRequestPanel = null;
	private ButtonGroup kvmsButtonGroup = null;
	private byte dialogType;
	private String reqUserDetails = null;
	private JRadioButton blockRequests = null;

	public KVMShareDialog() {
		this.kvmsRequestLabel = new JLabel();
		this.kvmsTimerLabel = new JLabel();
		this.mediaRedirStatus = new JLabel();
		this.fullAccessChoice = new JRadioButton(LocaleStrings.getString("H_1_KVMS") + "       ", false);
		this.partialAccessChoice = new JRadioButton(LocaleStrings.getString("H_2_KVMS"), false);
		this.denyAccessChoice = new JRadioButton(LocaleStrings.getString("H_3_KVMS") + "     ", false);
		this.blockRequests = new JRadioButton(LocaleStrings.getString("F_149_JVM") + "     ", false);
		this.kvmsResponsePanel = new JPanel();
		this.kvmsRequestPanel = new JPanel();
	}

	private void constructResponseDialog(byte paramByte) {
		this.dialogType = paramByte;
		constructNorthPanel();
		constructCenterPanel();
		constructSouthPanel();
		this.kvmsResponsePanel.setLayout(new BorderLayout());
		this.kvmsResponsePanel.add(this.kvmsNorthPanel, "North");
		this.kvmsResponsePanel.add(this.kvmsCenterPanel, "Center");
		this.kvmsResponsePanel.add(this.kvmsSouthPanel, "South");
		JFrame localJFrame = JViewer.getMainFrame();
		this.kvmsResponseDialog = new JDialog(localJFrame, LocaleStrings.getString("H_6_KVMS"), true);
		if (paramByte != 1)
			this.kvmsResponseDialog.setModal(false);
		this.kvmsResponseDialog.add(this.kvmsResponsePanel);
		this.kvmsResponseDialog.pack();
		this.kvmsResponseDialog.setResizable(false);
		this.kvmsResponseDialog.setLocation(300, 300);
		this.kvmsResponseDialog.repaint();
		this.kvmsResponseDialog.addKeyListener(new KVMShareDialogKeyListener());
		this.kvmsResponseDialog.addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent paramAnonymousWindowEvent) {
				JViewerApp localJViewerApp = JViewerApp.getInstance();
				Debug.out.println("Deny is Request");
				if (KVMShareDialog.this.dialogType == 2) {
					localJViewerApp.OnSendKVMPrevilage((byte) 2, KVMShareDialog.this.reqUserDetails);
				} else if (KVMShareDialog.this.dialogType == 0)
					localJViewerApp.OnSendKVMPrevilage((byte) 1, KVMShareDialog.this.reqUserDetails);
				KVMShareDialog.this.getKVMShareResponseDialog().dispose();
				KVMShareDialog.this.getTimer().stop();
				KVMShareDialog.this.kvmsDecisionDuration = 30;
				if (KVMShareDialog.this.reqUserDetails != null)
					JViewerApp.getInstance().getResponseDialogTable().remove(KVMShareDialog.this.reqUserDetails);
				KVMShareDialog.this.kvmsTimerLabel.setText("");
			}

		});
		this.reqUserDetails = (KVMSharing.KVM_CLIENT_USERNAME + " : " + KVMSharing.KVM_CLIENT_IP + " : "
				+ KVMSharing.KVM_CLIENT_SESSION_INDEX);

		JViewerApp.getInstance().initResponseDialogTable();
		JViewerApp.getInstance().getResponseDialogTable().put(this.reqUserDetails, this.kvmsResponseDialog);
	}

	private void constructNorthPanel() {
		String str = "";
		if (this.kvmsNorthPanel == null) {
			this.kvmsNorthPanel = new JPanel();
		} else
			this.kvmsNorthPanel.removeAll();
		this.kvmsNorthPanel.setLayout(new FlowLayout(3));
		if ((this.dialogType == 0) || (this.dialogType == 2)) {
			str = LocaleStrings.getString("H_4_KVMS") + " " + KVMSharing.KVM_CLIENT_USERNAME + "("
					+ JViewerApp.getInstance().getIpmiPrivText(KVMSharing.KVM_CLIENT_IPMI_PRIV) + ")" + " "
					+ LocaleStrings.getString("H_5_KVMS") + " " + KVMSharing.KVM_CLIENT_IP;

		} else if (this.dialogType == 1) {
			str = LocaleStrings.getString("H_13_KVMS");
			this.kvmsNorthPanel.add(Box.createHorizontalStrut(150));
		}
		if (this.kvmsResponseLabel == null) {
			this.kvmsResponseLabel = new JLabel(str);
		} else
			this.kvmsResponseLabel.setText(str);
		this.kvmsRequestLabel.setHorizontalTextPosition(2);
		this.kvmsNorthPanel.add(this.kvmsResponseLabel, 0);
	}

	private void constructCenterPanel() {
		if (this.mediaRedirStatus == null)
			this.mediaRedirStatus = new JLabel();
		this.mediaRedirStatus.setText(LocaleStrings.getString("H_14_KVMS"));
		this.mediaRedirStatus.setForeground(Color.blue);
		if (this.kvmsCenterPanel == null) {
			this.kvmsCenterPanel = new JPanel();
		} else
			this.kvmsCenterPanel.removeAll();
		Object localObject;
		if (this.kvmsButtonGroup == null) {
			this.kvmsButtonGroup = new ButtonGroup();
		} else {
			localObject = this.kvmsButtonGroup.getElements();
			while (((Enumeration) localObject).hasMoreElements()) {
				this.kvmsButtonGroup.remove((AbstractButton) ((Enumeration) localObject).nextElement());
			}
		}
		if ((this.dialogType == 0) || (this.dialogType == 2)) {
			if (this.fullAccessChoice == null) {
				this.fullAccessChoice = new JRadioButton(LocaleStrings.getString("H_1_KVMS") + "       ", false);
				this.fullAccessChoice.setMnemonic(65);
			}
			if (this.partialAccessChoice == null) {
				this.partialAccessChoice = new JRadioButton(LocaleStrings.getString("H_2_KVMS"), false);
				this.partialAccessChoice.setMnemonic(86);
			}
			if (this.blockRequests == null) {
				this.blockRequests = new JRadioButton(LocaleStrings.getString("F_149_JVM"), false);
				this.blockRequests.setMnemonic(66);
			}
			localObject = new RadioListener();
			if (this.dialogType == 0) {
				if (this.denyAccessChoice == null) {
					this.denyAccessChoice = new JRadioButton(LocaleStrings.getString("H_3_KVMS") + "     ", false);
					this.denyAccessChoice.setMnemonic(68);
				}

				this.kvmsCenterPanel.setLayout(new GridLayout(5, 1));
				this.kvmsButtonGroup.add(this.fullAccessChoice);
				this.kvmsCenterPanel.add(this.fullAccessChoice);
				this.fullAccessChoice.addActionListener((ActionListener) localObject);
				this.kvmsButtonGroup.add(this.partialAccessChoice);
				this.kvmsCenterPanel.add(this.partialAccessChoice);
				this.partialAccessChoice.addActionListener((ActionListener) localObject);
				this.kvmsButtonGroup.add(this.denyAccessChoice);
				this.kvmsCenterPanel.add(this.denyAccessChoice);
				this.denyAccessChoice.addActionListener((ActionListener) localObject);
				this.kvmsButtonGroup.add(this.blockRequests);
				this.kvmsCenterPanel.add(this.blockRequests);
				this.blockRequests.addActionListener((ActionListener) localObject);
				this.kvmsCenterPanel.add(this.mediaRedirStatus);
			} else if (this.dialogType == 2) {
				this.kvmsCenterPanel.setLayout(new GridLayout(4, 1));
				this.kvmsButtonGroup.add(this.fullAccessChoice);
				this.kvmsCenterPanel.add(this.fullAccessChoice);
				this.fullAccessChoice.addActionListener((ActionListener) localObject);
				this.kvmsButtonGroup.add(this.partialAccessChoice);
				this.kvmsCenterPanel.add(this.partialAccessChoice);
				this.partialAccessChoice.addActionListener((ActionListener) localObject);
				this.kvmsButtonGroup.add(this.blockRequests);
				this.kvmsCenterPanel.add(this.blockRequests);
				this.blockRequests.addActionListener((ActionListener) localObject);
				this.kvmsCenterPanel.add(this.mediaRedirStatus);
			}

			this.fullAccessChoice.setSelected(true);
		} else if (this.dialogType == 1) {
			int i = KVMClient.getNumUsers();
			String[] arrayOfString = KVMClient.getUserData();
			JRadioButton[] arrayOfJRadioButton = new JRadioButton[i];
			this.kvmsCenterPanel.setLayout(new GridLayout(i - 1, 1));

			for (int j = 0; j < i; j++) {
				String str1 = arrayOfString[j].substring(arrayOfString[j].indexOf(":") + 1, arrayOfString[j].length())
						.trim();
				String str2 = arrayOfString[j].substring(0, arrayOfString[j].indexOf(":") - 1).trim();

				if (Integer.parseInt(str2) != JViewerApp.getInstance().getCurrentSessionId()) {

					arrayOfJRadioButton[j] = new JRadioButton(str1);
					arrayOfJRadioButton[j].setActionCommand(arrayOfString[j]);
					this.kvmsCenterPanel.add(arrayOfJRadioButton[j]);
					this.kvmsButtonGroup.add(arrayOfJRadioButton[j]);
				}
			}
			this.kvmsCenterPanel.repaint();
		}
	}

	private void constructSouthPanel() {
		if (this.kvmsSouthPanel == null) {
			this.kvmsSouthPanel = new JPanel();
			this.kvmsSouthPanel.setLayout(new FlowLayout());
			if (this.kvmsSubmitButton == null)
				initSubmitButton();
			if (this.kvmsTimerLabel == null)
				this.kvmsTimerLabel = new JLabel();
			if (this.dialogType == 1) {
				this.kvmsTimerLabel.setText("(10 " + LocaleStrings.getString("H_7_KVMS") + " )");
			} else
				this.kvmsTimerLabel.setText("(30 " + LocaleStrings.getString("H_7_KVMS") + " )");
			this.kvmsSouthPanel.add(this.kvmsSubmitButton);
			this.kvmsSouthPanel.add(this.kvmsTimerLabel);
		}
	}

	private void initSubmitButton() {
		this.kvmsSubmitButton = new JButton(LocaleStrings.getString("A_3_GLOBAL"));
		KVMShareDialogButtonListener localKVMShareDialogButtonListener = new KVMShareDialogButtonListener();
		this.kvmsSubmitButton.addActionListener(localKVMShareDialogButtonListener);
	}

	private void showResponseDialog() {
		this.kvmsResponseDialog.setVisible(true);
		this.kvmsResponseDialog.repaint();
		this.kvmsResponseDialog.requestFocus();
	}

	private void constructRequestDialog() {
		JFrame localJFrame = JViewer.getMainFrame();
		this.kvmsRequestDialog = new JDialog(localJFrame, "", false);
		this.kvmsRequestPanel.setLayout(new BorderLayout());
		this.kvmsRequestPanel.add(this.kvmsRequestLabel, "Center");
		this.kvmsRequestDialog.setSize(900, 50);
		this.kvmsRequestDialog.add(this.kvmsRequestPanel);
		this.kvmsRequestDialog.setUndecorated(true);
		this.kvmsRequestDialog.setResizable(false);
		this.kvmsRequestDialog.setLocation(75, 300);
	}

	private void showRequestDialog() {
		this.kvmsRequestLabel.setText("       " + LocaleStrings.getString("H_8_KVMS") + " "
				+ KVMSharing.KVM_CLIENT_USERNAME + " " + LocaleStrings.getString("H_5_KVMS") + " "
				+ KVMSharing.KVM_CLIENT_IP + "(30 " + LocaleStrings.getString("H_7_KVMS") + " )");
		this.kvmsRequestDialog.setVisible(true);
		this.kvmsRequestDialog.requestFocus();
	}

	public void setUserStatus(boolean paramBoolean) {
		isMasterSession = paramBoolean;
	}

	public void constructDialog(byte paramByte) {
		this.kvmsTimer = new Timer(1000, new KVMShareDialogListener());
		if (paramByte == 1) {
			this.kvmsDecisionDuration = 10;
		} else
			this.kvmsDecisionDuration = 30;
		if (isMasterSession) {
			constructResponseDialog(paramByte);
		} else {
			constructRequestDialog();
		}
	}

	public void showDialog() {
		this.kvmsTimer.start();
		if (isMasterSession) {
			showResponseDialog();
		} else {
			showRequestDialog();
		}
	}

	public void showInformationDialog(String paramString) {
		JVFrame localJVFrame = JViewerApp.getInstance().getMainWindow();
		JOptionPane.showMessageDialog(localJVFrame, paramString, LocaleStrings.getString("H_10_KVMS"), 1);
	}

	public JButton getOkButton() {
		return this.kvmsSubmitButton;
	}

	public JLabel getUserTwoTimerLabel() {
		return this.kvmsRequestLabel;
	}

	public JDialog getKVMShareResponseDialog() {
		return this.kvmsResponseDialog;
	}

	public JDialog getKVMShareRequestDialog() {
		return this.kvmsRequestDialog;
	}

	public Timer getTimer() {
		return this.kvmsTimer;
	}

	public JLabel getTimerLabel() {
		return this.kvmsTimerLabel;
	}

	public JRadioButton getRadioButtonOne() {
		return this.fullAccessChoice;
	}

	public JRadioButton getRadioButtonTwo() {
		return this.partialAccessChoice;
	}

	public JRadioButton getRadioButtonThree() {
		return this.denyAccessChoice;
	}

	public JRadioButton getRadioButtonFour() {
		return this.blockRequests;
	}

	public ButtonGroup getKvmsButtonGroup() {
		return this.kvmsButtonGroup;
	}

	public byte getDialogType() {
		return this.dialogType;
	}

	public void disposeKVMShareResponseDialog() {
		if (this.kvmsTimer != null)
			this.kvmsTimer.stop();
		this.kvmsDecisionDuration = 30;
		if (this.kvmsResponseDialog != null) {
			this.kvmsResponseDialog.dispose();
			this.kvmsResponseDialog = null;
		}
		if (this.reqUserDetails != null) {
			JViewerApp.getInstance().getResponseDialogTable().remove(this.reqUserDetails);
		}
	}

	public void disposeKVMShareReqestDialog() {
		if (this.kvmsTimer != null)
			this.kvmsTimer.stop();
		this.kvmsDecisionDuration = 30;
		if (this.kvmsRequestDialog != null) {
			this.kvmsRequestDialog.dispose();
			this.kvmsRequestDialog = null;
		}
	}

	class KVMShareDialogListener implements ActionListener {
		KVMShareDialogListener() {
		}

		public void actionPerformed(ActionEvent paramActionEvent) {
			// TODO tianlin
//			KVMShareDialog.access$210(KVMShareDialog.this);

			if (KVMShareDialog.this.kvmsDecisionDuration <= 0) {
				KVMShareDialog.this.getTimer().stop();
				KVMShareDialog.this.kvmsDecisionDuration = 30;
				if (KVMShareDialog.isMasterSession) {
					Debug.out.println("User didn't gave any input");
					if (KVMShareDialog.this.getKVMShareResponseDialog() != null)
						KVMShareDialog.this.getKVMShareResponseDialog().dispose();
					if (KVMShareDialog.this.reqUserDetails != null) {
						JViewerApp.getInstance().getResponseDialogTable().remove(KVMShareDialog.this.reqUserDetails);
					}
				} else if (!KVMShareDialog.isMasterSession) {
					if (KVMShareDialog.this.getKVMShareRequestDialog() != null)
						KVMShareDialog.this.getKVMShareRequestDialog().dispose();
					Debug.out.println("Time out grant full access");
				}

			} else if (KVMShareDialog.isMasterSession) {

				KVMShareDialog.this.getTimerLabel().setText("(" + KVMShareDialog.this.kvmsDecisionDuration + " "
						+ LocaleStrings.getString("H_7_KVMS") + ")");
				KVMShareDialog.this.getTimerLabel().repaint();
			} else if (!KVMShareDialog.isMasterSession) {

				if (KVMShareDialog.this.getKVMShareRequestDialog() != null) {
					KVMShareDialog.this.getUserTwoTimerLabel()
							.setText("       " + LocaleStrings.getString("H_8_KVMS") + " "
									+ KVMSharing.KVM_CLIENT_USERNAME + " " + LocaleStrings.getString("H_5_KVMS")
									+ KVMSharing.KVM_CLIENT_IP + "  (" + KVMShareDialog.this.kvmsDecisionDuration + " "
									+ LocaleStrings.getString("H_7_KVMS") + ")");
					KVMShareDialog.this.getKVMShareRequestDialog().repaint();
				}
			}
		}
	}

	class KVMShareDialogKeyListener implements KeyListener {
		KVMShareDialogKeyListener() {
		}

		public void keyPressed(KeyEvent paramKeyEvent) {
			if (KVMShareDialog.isMasterSession) {
				if ((paramKeyEvent.getModifiersEx() & 0x200) == 512) {
					if (paramKeyEvent.getKeyCode() == 65) {

						KVMShareDialog.this.getRadioButtonOne().setSelected(true);
						KVMShareDialog.this.getRadioButtonOne().repaint();
					} else if (paramKeyEvent.getKeyCode() == 86) {
						KVMShareDialog.this.getRadioButtonTwo().setSelected(true);
						KVMShareDialog.this.getRadioButtonTwo().repaint();
					} else if (paramKeyEvent.getKeyCode() == 68) {
						KVMShareDialog.this.getRadioButtonThree().setSelected(true);
						KVMShareDialog.this.getRadioButtonThree().repaint();
					} else if (paramKeyEvent.getKeyCode() == 66) {
						KVMShareDialog.this.getRadioButtonFour().setSelected(true);
						KVMShareDialog.this.getRadioButtonFour().repaint();
					}
				} else if (paramKeyEvent.getKeyCode() == 10) {
					Debug.out.println("***********ENTER KEY DETECTED********");
					KVMShareDialog.this.getOkButton().doClick();
				}
				return;
			}
		}

		public void keyTyped(KeyEvent paramKeyEvent) {
		}

		public void keyReleased(KeyEvent paramKeyEvent) {
		}
	}

	class KVMShareDialogButtonListener implements ActionListener {
		JViewerApp RCApp = JViewerApp.getInstance();

		KVMShareDialogButtonListener() {
		}

		public void actionPerformed(ActionEvent paramActionEvent) {
			if (paramActionEvent.getSource().equals(KVMShareDialog.this.getOkButton())) {
				Object localObject;
				if ((KVMShareDialog.this.getDialogType() == 0) || (KVMShareDialog.this.getDialogType() == 2)) {
					Debug.out.println("Submit Clicked");
					if (KVMShareDialog.this.getRadioButtonOne().isSelected()) {
						Debug.out.println("Allow KVM is Selected");
						this.RCApp.getM_frame().onStopVMediaRedirection(0);
						this.RCApp.getKVMClient().SendKVMPrevilage((byte) 0, KVMShareDialog.this.reqUserDetails);
						if (this.RCApp.isFullPermissionRequest()) {
							this.RCApp.setFullPermissionRequest(false);
						}

						localObject = JViewerApp.getInstance().getResponseDialogTable().entrySet();
						Iterator localIterator = ((Set) localObject).iterator();
						JDialog localJDialog = null;
						String str = null;
						while (localIterator.hasNext()) {
							try {
								Map.Entry localEntry = (Map.Entry) localIterator.next();
								localJDialog = (JDialog) localEntry.getValue();
								str = (String) localEntry.getKey();
								if (localJDialog != null)
									localJDialog.dispose();
							} catch (Exception localException) {
								Debug.out.println(localException);
							}
						}
						JViewerApp.getInstance().getResponseDialogTable().clear();
					} else if (KVMShareDialog.this.getRadioButtonTwo().isSelected()) {
						Debug.out.println("Allow only Video is Selected");
						this.RCApp.OnSendKVMPrevilage((byte) 2, KVMShareDialog.this.reqUserDetails);
						KVMShareDialog.this.getKVMShareResponseDialog().dispose();
						KVMShareDialog.this.getTimer().stop();
						KVMShareDialog.this.kvmsDecisionDuration = 30;
						if (KVMShareDialog.this.reqUserDetails != null) {
							JViewerApp.getInstance().getResponseDialogTable()
									.remove(KVMShareDialog.this.reqUserDetails);
						}
					} else if (KVMShareDialog.this.getRadioButtonThree().isSelected()) {
						Debug.out.println("Deny is Selected");
						this.RCApp.OnSendKVMPrevilage((byte) 1, KVMShareDialog.this.reqUserDetails);
						KVMShareDialog.this.getKVMShareResponseDialog().dispose();
						KVMShareDialog.this.getTimer().stop();
						KVMShareDialog.this.kvmsDecisionDuration = 30;
						if (KVMShareDialog.this.reqUserDetails != null) {
							JViewerApp.getInstance().getResponseDialogTable()
									.remove(KVMShareDialog.this.reqUserDetails);
						}
					} else if (KVMShareDialog.this.getRadioButtonFour().isSelected()) {
						Debug.out.println("Block requests is Selected");

						JViewerApp.getInstance().getJVMenu().notifyMenuStateSelected("BlockFullPermission", true);

						KVMSharing.BLOCK_KVM_REQ = true;

						this.RCApp.OnSendKVMPrevilage((byte) 6, KVMShareDialog.this.reqUserDetails);

						KVMShareDialog.this.getKVMShareResponseDialog().dispose();

						KVMShareDialog.this.getTimer().stop();

						KVMShareDialog.this.kvmsDecisionDuration = 30;
						if (KVMShareDialog.this.reqUserDetails != null) {
							JViewerApp.getInstance().getResponseDialogTable()
									.remove(KVMShareDialog.this.reqUserDetails);
						}
					} else {
						JOptionPane.showMessageDialog(KVMShareDialog.this.getKVMShareResponseDialog(),
								LocaleStrings.getString("H_9_KVMS"), LocaleStrings.getString("A_5_GLOBAL"), 0);
					}
					KVMShareDialog.this.kvmsTimerLabel.setText("");
				} else if (KVMShareDialog.this.getDialogType() == 1) {
					if (KVMShareDialog.this.getKvmsButtonGroup().getSelection() != null) {
						localObject = KVMShareDialog.this.getKvmsButtonGroup().getSelection().getActionCommand();
						if (localObject == null) {
							return;
						}
						this.RCApp.sendSelectedMasterInfo((String) localObject);
					}
					KVMShareDialog.this.getKVMShareResponseDialog().dispose();
					KVMShareDialog.this.getTimer().stop();
					KVMShareDialog.this.kvmsDecisionDuration = 30;
				}
				return;
			}
		}
	}

	class RadioListener implements ActionListener {
		RadioListener() {
		}

		public void actionPerformed(ActionEvent paramActionEvent) {
			JRadioButton localJRadioButton = (JRadioButton) paramActionEvent.getSource();
			if (localJRadioButton.getText().contains(LocaleStrings.getString("H_1_KVMS"))) {
				KVMShareDialog.this.mediaRedirStatus.setText(LocaleStrings.getString("H_14_KVMS"));
			} else {
				KVMShareDialog.this.mediaRedirStatus.setText("");
			}
		}
	}
}

/*
 * Location: D:\Users\tianlin\Downloads\JViewer.jar!\com\ami\kvm\jviewer\gui\
 * KVMShareDialog.class Java compiler version: 5 (49.0) JD-Core Version: 0.7.1
 */